Kennen Sie schon: die Demo aus Woche 1
Heute bauen Sie sie selbst.
import matplotlib.pyplot as plt
stunden = [8, 9, 10, 11, 12, 13, 14, 15]
temperaturen = [18.2, 19.1, 21.4, 24.0, 26.3, 27.1, 25.8, 22.5]
plt.plot(stunden, temperaturen)
plt.show()
import matplotlib.pyplot as plt – der Kurzname plt ist überall Standard
plt.plot(x, y): erste Liste → x-Achse, zweite Liste → y-Achse
plt.show() zeigt das Bild an